﻿@using WebUI3.Models;
@{
    ViewBag.Title = "Billing";
    Layout = "~/Views/Shared/_EditLayout.cshtml";
}

<h2>业务单据</h2>
<input id="ss"  /> 
<table id="dg">
<thead>
    <tr>  
        <th field="ID">编号</th>  
        <th field="TransDate"              editor="datebox" >日期</th>  
        <th field="StaffName"            editor="text">业务员姓名</th>  
        <th field="ProductName"         editor="text">产品明细</th>  
        <th field="Amount"                  editor="text">金额</th>  
        <th field="ProductGroup"        editor="text">产品类型</th>  
        <th field="CompanyName"      editor="text">分公司</th>  
        <th field="CenterName"          editor="text">中心</th>  
        <th field="DepartmentName"  editor="text">部门</th>  
        <th field="IsNewCustomer"       editor="text">是否今年新客户</th>  
        <th field="ContractNo"          editor="text">合同单号</th>  
        <th field="CRM_OrderNo"       editor="text">CRM订单号</th>  
        <th field="CustomerName"  editor="text">公司详细名称</th>  
        <th field="Remark"              editor="text">备注</th>  
        <th field="Operator"            editor="text">创建人</th>  
        <th field="CreateTime" >创建日期</th>  
        

    </tr>
</thead>
</table>

<script type="text/javascript">


    $(document).ready(function () {

        loadGrid('Billing');
       // var cols = $('#dg').datagrid('getColumnOption').columns[0];
        $('#dg').datagrid('getColumnOption','TransDate').formatter = dateFormatter("yyyy-MM-dd");
        $('#dg').datagrid('getColumnOption', 'IsNewCustomer').formatter = boolFormatter('是', '否');
    });
    function addObject() {
        var d = new Date();
        return { TransDate: d.Format("yyyy-MM-dd"), CreateTime: d.Format("yyyy-MM-dd hh:mm:ss"), LastModifyTime: d.Format("yyyy-MM-dd hh:mm:ss") };
    }
</script>